package com.open.capacity.activity.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.common.model.Activity;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * @program: open-capacity-platform
 * @description:
 * @author: bellweather
 * @create: 2021-01-18 16:22
 **/

@Mapper
public interface ActivityDao extends BaseMapper<Activity> {

    List<Activity> getList(Map<String,Object> params);

    int save(Activity activity);


    int update(Activity activity);


    @Update("update `activity` set deleted = #{deleted} where id =#{id}")
    int delete(@Param("id")int id,@Param("deleted") int deleted);

    @Delete("delete from `activity` where id=#{id}")
    int realDel(int id);
}
